-
Notifications
You must be signed in to change notification settings - Fork 409
Adding support for building on wercker #1120
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
|
Separated wercker related changes to separate files ( apart from agent_test.go_ and now builds on both wercker staging - https://dev.wercker.com/ravi-r-singhal/fn/runs/build/5b487dac5edcca00064ec9cb and circleci - https://circleci.com/gh/fnproject/fn/4031 |
|
Thanks for this @lake-of-dreams. We're definitely open to running the build process on Wercker as discussed, but we shouldn't have staging/dev inside OSS master. When can this be run on Wercker production for anyone to access? |
|
Thanks @carimura - we anticipate that this feature will be in production in next couple of weeks or earlier. I will let you know when that happens!! |
|
@carimura - The feature is now released in wercker prod and I have also created a pipeline for the fork that I had created at https://app.wercker.com/ravi-r-singhal/fn/runs I have made you admin for the application above. This feature is not public yet and is only allowed to users of certain |
Currently fnproject builds on circleci. This PR demonstrates changes that will be required to build it in wercker
Following are the changes required to build fnproject as is on wercker.
wercker.yml - Added a wercker.yml on lines of existing .circlecli/config.yml. Few things have changed for example we no more require to install
golangas the baseboxbeing used isgolang:1.10itself.Also changedCIRCLE_BRANCHto equivalentWERCKER_GIT_BRANCH. Not sure about the usage and need ofCIRCLE_PR_REPONAMEbut if required - we can try to find equivalents in wercker for this as well.agent_test.go - Two tests were modified -
TestTmpFsRWandTestTmpFsSize. Both of these tests were trying to check if/proc/mountscontains mount points for '/tmp' and/both. When running in wercker - only/tmpentry was there in/proc/mounts. Also the attribute string was not exact as being compared (rw,nosuid,nodev,noexec,relatimeinTestTmpFsRWandrw,nosuid,nodev,noexec,relatime,size=1024k,nr_inodes=1024inTestTmpFsSize) . Therefore changes these tests slightly to not look for/entry in '/proc/mounts' and also verify presence of each attribute for/tmpindividually rather than as a whole string.release.sh, images/dind/release.sh, images/fn-test-utils/release.sh - In
release.shandimages/dind/release.sh-git statuscommand was failing in wercker with a dirty tree error -showing
as being modified but not staged. Could not understand why these deps were checked in in vendor folder and also why git was giving a error - not sure if any of the build steps inside Makefile is touching these files. Therefore commented all the
gitrelated code inrelease.shandimages/dind/release.sh. Also some code was changed in these scripts to tag and push to repositories under DOCKER_USER in dockerhub for testing instead of pushing to fnproject itself.test.sh - When running in wercker - we create a custom network for docker containers and any containers that requires access to each other ( even all the wercker
stepsare run in a container only calledbox) - has to be on that network. Therefore changed the code that started the mysql, minio and postgres containers by adding a--network=$DOCKER_NETWORK_NAME. Also as an advantage of this custom network - we no longer need thehostfunction to deduce IP address of these containers as these can now simply be referred by the container name as will be visible in the script.Also to test
fnproject/swaggerit was required thatpwdis mounted at/go/src/github.com/fnproject/fnin the container - but as explained earlier since we run all the steps inside a docker container only - to make data available to any other container - we need to use dockervolume. Therefore changes were done to copy firstpwdto a dockervolumeusing an ephemeral container and then attach that container tofnproject/swaggerto work as expectedHow I did it
As you can see this has been done in fork of fnproject and may or may not be merged directly to your main repo based on whether you would want to cut over to wercker completely or want to run circleci and wercker in parallel for some time. But this should give you an fare idea of the possibilities.!
How to verify it
I have created a pipeline in wercker staging at https://dev.wercker.com/ravi-r-singhal/fn/ and anyone with access to wercker staging should be able to view the application and builds
One line description for the changelog
One moving picture involving robots (not mandatory but encouraged)